<?php
namespace app\api\controller;

use think\Controller;

class Category extends Controller
{
    public function getCategoryByParentId()
    {
      $id = input('post.id',0,'intval');
      // getNormalCategoryByParentId
         $categorylist = model('Category')->getNormalCategoryByParentId($id);
         if (!$categorylist) {
             return show(-1,'error');
         }
         return show(1,'success',$categorylist);

    }
}     